<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ page import="org.tobuy.vo.*" import="org.tobuy.factory.*" %>
<%@ page import="java.util.List" import="java.util.ArrayList" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    
    <title>My JSP 'showItems.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
 
    <h3>Currently on sell</h3>
    	<table border=1>
   			<tr>
   				<td>Type</td>
  				<td>Name</td>
  				<td>Price</td>
  				<td>Description</td>
  				<td>Detail</td>
 		  </tr>
 <%
  	List<Item> items = new ArrayList<Item>();
  	items = ItemDAOFactory.getIItemDAOInstance().findItems();
  	Iterator<Item> iter = items.iterator();
  	while(iter.hasNext()){
  	Item item = iter.next();
 %>
 		  <tr>
  				<td><%=item.getType() %></td>
  				<td><%=item.getItem_name() %></td>
  				<td><%=item.getPrice() %></td>
  				<td><%=item.getBeschreibung() %></td>
  				<td><a href="ShowItemInfo?itemid=<%=item.getItem_id() %>">Show Detail</a></td>
  		  </tr>
 <%} %>
  		</table><br>
  </body>
</html>
